package com.lc.my_springframework.beans;

import java.util.ArrayList;
import java.util.List;

public class MutablePropertyValues implements ConfigurablePropertyValues{
    private final List<PropertyValue> propertyValueList;

    public MutablePropertyValues() {
        this.propertyValueList = new ArrayList<>(8);
    }

    @Override
    public PropertyValue[] getPropertyValues() {
        return this.propertyValueList.toArray(new PropertyValue[0]);
    }

    @Override
    public void addPropertyValues(PropertyValue propertyValue) {
        this.propertyValueList.add(propertyValue);
    }
}
